<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<% Cookie[] cookies = request.getCookies(); %>
<%!
	private String getCookieValue(Cookie[] cookies,String name){		
		if(cookies == null) return null;
		for(Cookie cookie:cookies){
			if(cookie.getName().equals(name))
				return cookie.getValue();
		}
		return null;
	}
%>

<title>쿠키 데이터 읽기 </title>
이름: <%= getCookieValue(cookies,"name") %><br>
성별: <%= getCookieValue(cookies,"gender") %><br>
나이: <%= getCookieValue(cookies,"age") %>






